<?php

switch (DEFAULT_MODULE) {
    //index.php入口路由
    case 'home':
        Route::domain(['jueyuan', 'www'], function () {
            // 动态注册域名的路由规则
            Route::rule('/hangye', '/xiehuijieshao');
            Route::rule('/jiance', '/zhongxin');
            Route::rule('/biaozhun', '/biaoweihui');
            // Route::rule('/zhuan','/zwhjianjie.html');
            // Route::rule('/zazhi','/liulan.html');
            // Route::rule('/huodong','/tongzhi.html');
        });
        Route::rule(':name/:id$', 'column/content')->pattern(['name' => '[a-zA-Z]+', 'id' => '\d+']);
        Route::rule('qikan', 'index/indexzazhi');
        Route::rule('search', 'index/search');
        Route::rule('psearch', 'index/psearch');
        Route::rule('gongqiu', 'index/gongqiu');
        Route::rule('detail', 'index/detail');
        Route::rule('chaxun', 'index/chaxun');
        Route::rule('jindu', 'index/jindu');
        Route::rule('authenticity', 'index/authenticity');
        Route::rule('captcha/[:id]', "\\think\\captcha\\CaptchaController@index");
        Route::rule('single/index/<id>', 'single/index')->pattern(['id' => '\d+']);
        Route::rule('Sitemap.xml', 'Seo/Sitemap');
        Route::rule('<name>/<condition?>-<page?>', 'column/index')->pattern(['name' => '[a-zA-Z]+', 'condition' => '[0-9_&=a-zA-Z]+', 'page' => '\d+']);
        Route::rule('/', 'index/index');
        break;
        // case 'api':
        //     Route::domain('api', function () {
        //         // 动态注册域名的路由规则
        //         Route::rule('article/info/:id', 'api/Article/info');
        //     })->bind('api');
}
// Route::domain('api', function () {
//     // 动态注册域名的路由规则
//     Route::rule('article/info/:id', 'api/Article/info');
// })->bind('api');
